body {
    background-image: radial-gradient(#4f6875, #263238);
}

a, a:before, a:after {
    box-sizing: border-box;
}

.toggle {
    position: relative;
    display: block;
    width: 150px;
    height: 60px;
    margin: 0 auto;
    outline: 0;
    border-radius: 100px;
    text-decoration: none;
    border: 2px solid #ededed;
    transition: all 0.5s ease-in;
    z-index: 1;
}

.toggle-off {
    background-color: #ffffff;
}

.toggle-on {
    background-color: #4cda64;
}

.toggle:after {
    position: absolute;
    display: block;
    top: 2px;
    left: 2px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #ededed;
    font-size: 20px;
    text-transform: uppercase;
    text-align: center;
    transition: all .5s ease-in;
    z-index: 2;
    content: '';
}

.toggle-off:after {
    transform: translate(0, 0);
}

.toggle-on:after {
    transform: translate(173%, 0);
}